//
//  WJNavinationView.m
//  天气
//
//  Created by dllo on 16/8/23.
//  Copyright © 2016年 WJ. All rights reserved.
//

#import "WJNavinationView.h"

@implementation WJNavinationView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
       
        [self createView];
        
        
    }
    return self;
}

- (void)createView
{
    self.lable = [[UILabel alloc]initWithFrame:CGRectMake(0, 20, 100, 30)];
    self.lable.center = self.center;
    self.lable.textAlignment = 1;
    self.lable.textColor = [UIColor whiteColor];
    [self addSubview:self.lable];
    
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(20, 20, 25, 25);
    [button setImage:[UIImage imageNamed:@"yyb_icon_back"] forState:0];
    [button addTarget:self action:@selector(button) forControlEvents:1<<6];
    [self addSubview:button];
}


- (void)button
{
    if (self.Block) {
        
        self.Block();
    }
}






















@end
